﻿@inject IStringLocalizer<Searchs> Localizer

<Search IgnoreCase="true"
        IsLikeMatch="true"
        IsAutoFocus="true"
        PlaceHolder="@Localizer["SearchsPlaceHolder"]"
        Items="@Items"
        OnSearch="@OnSearch"
        IsSelectAllTextOnFocus="true" />
<ConsoleLogger @ref="Logger" class="mt-3" />

@code {
    [NotNull]
    private ConsoleLogger? Logger { get; set; }

    private static IEnumerable<string> Items => new string[] { "1", "12", "123", "1234" };

    private Task OnSearch(string searchText)
    {
        Logger.Log($"SearchText: {searchText}");
        return Task.CompletedTask;
    }
}
